<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../js/vue.js"></script>
</head>
<body>
     <!-- 容器 -->
     <div id="app">
           <h1>{{name}}</h1>
           <p>{{age}}</p>
           <input type="text" :value="hobby"/>
     </div>
</body>
</html>
<script>
     //创建VM实例
     //VM属性的属性值流向页面称之为数据单向绑定
     const VM = new Vue({
         el:'#app',
         data:{
             name:"曹操",
             age:1865,
             hobby:'喜欢貂蝉'
         }
     }) 
</script>